<template>
  <div class="cartList">
    <scroll class="content" ref="scroll" :probeType="3">
      <cart-list-item v-for="(item,index) in cartList" :key="index" :itemInfo="item"></cart-list-item>
    </scroll>
  </div>
</template>

<script>
import Scroll from '@/components/common/scroll/Scroll.vue'


import {mapGetters} from 'vuex'
import CartListItem from './CartListItem.vue'

export default {
  components: { Scroll, CartListItem },
  name: 'CartList',
  computed: {
    ...mapGetters(['cartList'])
  },
  activated() {
    this.$refs.scroll.refresh()
  }
}
</script>

<style scoped>
  .cartList {
    height: calc(100% - 44px - 49px - 40px);
  }

  .content {
    overflow: hidden;
    height: 100%;
  }
</style>
